home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc International / Development / TSMTEsample⁄1.1 / Source / SamplePartVers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-14  |  4.1 KB  |  135 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        SamplePartVers.h
  3.  
  4.     Contains:    Version definitions used by SamplePart.idl & .r files.
  5.  
  6.     Written by:    Steve Smith
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.     
  10.     Notes:
  11.  
  12.     There are three sets of version numbers you need to maintain.
  13.     The CFM version numbers in the 'cfrg' resource, the SOM
  14.     class version numbers in the IDL file, and the Finder file
  15.     version number.
  16.     
  17.     Fortuantely, all three version schemes require a "major" and "minor"
  18.     number to generate the release version. This makes things
  19.     easier, but not simple. SOM classes only use those two pieces,
  20.     while CFM and the Finder define "development stage" and
  21.     "prerelease" version; the "prerelease" version can basically be
  22.     ignored, but be forewarned that CFM will use them, if provided.
  23.     
  24.     In all cases, a version number can be defined as 3 digits seperated
  25.     by 2 periods. The "major" version number has a range of 0-99, while
  26.     the two minor version numbers have a range of 0-9. An example of
  27.     a version number is '2.3.1'. All digits in the version number are
  28.     represented in Binary-Coded-Decimal (BCD) format even though they
  29.     appear in hexadecimal. The above example version number is 0x0231
  30.     in hexadecimal (note that the 3 and the 1 are in the same byte).
  31.     
  32.     Below is a set of defines to generate the version numbers for
  33.     all three instances. This file should be included in your .r and
  34.     .idl file to keep your part versioning in sync.
  35.     
  36.     Each time you need to update the version of the part generated, you
  37.     should find the appropriate constants and change them.
  38.     
  39.     ** WARNING **: Each linker that you run will require the same numbers you
  40.     specify here. Be sure to update your project preferences, for
  41.     integrated environments, and your makefile for MPW to ensure the version
  42.     numbers are the same everywhere.
  43.     
  44.     For complete explanation of version numbers, read the:
  45.     1) Finder Interface Chapter, Inside Macintosh: Macintosh Toolbox Essentials.
  46.     2) Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  47.     3) SOM Developer's Guide
  48.  
  49. */
  50.  
  51.  
  52. #ifndef _SAMPLEPARTVERS_
  53. #define _SAMPLEPARTVERS_
  54.  
  55.  
  56.  
  57. // • Stuff •
  58.  
  59. // Development Stages
  60. #define dsUndefined        0x00
  61. #define dsPreAlpha        0x20
  62. #define dsAlpha            0x40
  63. #define dsBeta            0x60
  64. #define dsFinal            0x80
  65. #define dsReleased        dsFinal
  66. #define dsGoldenMaster    dsFinal
  67.  
  68.  
  69.  
  70. // • Change Often •
  71.  
  72. // Current Major Version (version = MAJOR.minor.fix)
  73. #define currentMajorVersion        0x01
  74.  
  75. // Current Minor Version (version = major.MINOR.fix)
  76. #define currentMinorVersion        0x01
  77.  
  78. // Current Fix Version (version = major.minor.FIX)
  79. #define currentFixVersion        0x00
  80.  
  81. // Development Stage
  82. #define developmentStage        dsFinal
  83.  
  84. // Pre-release Number
  85. #define preReleaseNumber        0x00
  86.  
  87. // Short version string
  88. #define shortVersionStr            "1.1v2"
  89.  
  90.  
  91.  
  92. // • Change Less Often •
  93.  
  94. // SOM Part Class Major Version (must be an integer)
  95. #define somClassMajorVersion    1
  96.  
  97. // SOM Part Class Major Version (must be an integer)
  98. // (note: though not necessary, you might want to keep this version number
  99. //        in sync with the cfm and finder version numbers. To do this, make
  100. //        the version number equal to value of the following equation:
  101. //           ( 10 * currentMinorVersion ) + currentFixVersion
  102. #define somClassMinorVersion    2
  103.  
  104.  
  105.  
  106. // • Change Seldom •
  107.  
  108. // Old Compatibility Definition Major Version (for CFM only)
  109. #define oldCompDefnMajorVersion    0x00
  110.  
  111. // Old Compatibility Definition Minor Version (for CFM only)
  112. #define oldCompDefnMinorVersion    0x00
  113.  
  114. // Old Compatibility Definition Fix Version (for CFM only)
  115. #define oldCompDefnFixVersion    0x00
  116.  
  117. // Pre-release Number
  118. #define oldCompDefnPreRelNumber    0x00
  119.  
  120. // Development Stage
  121. #define oldCompDefnDevStage        dsUndefined
  122.  
  123.  
  124.  
  125. // • Generated Version Numbers •
  126. //       (Don't Change!!)
  127.  
  128. #define currentVersion            (currentMajorVersion<<24)+(currentMinorVersion<<20)+(currentFixVersion<<16)    \
  129.                                 +(developmentStage<<8)+preReleaseNumber
  130. #define compatibleVersion        (oldCompDefnMajorVersion<<24)+(oldCompDefnMinorVersion<<20)    \
  131.                                 +(oldCompDefnFixVersion<<16)+(oldCompDefnDevStage<<8)+oldCompDefnPreRelNumber
  132. #define finderMinorVersion        (currentMinorVersion<<4)+(currentFixVersion<<0)
  133.  
  134. #endif // _SAMPLEPARTVERSION_
  135.